package com.eastfair.venuebooking.api;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.eastfair.boot.request.PageParams;
import com.eastfair.core.base.R;
import com.eastfair.venueservice.dto.ServiceCategoryDTO;
import com.eastfair.venueservice.dto.ServiceCategoryPageQuery;
import com.eastfair.venueservice.vo.ServiceCategoryVO;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * 服务分类Feign
 * @author lyw
 */
@FeignClient(value = "venue-services-manage/serviceCategory")
public interface ServiceCategoryFeign {


    /**
     * 服务分类分页列表
     * @param params
     * @return
     */
    @PostMapping(value = "/queryServiceCategoryList")
    R<Page<ServiceCategoryVO>> queryServiceCategoryList(@RequestBody PageParams<ServiceCategoryPageQuery> params);



    /**
     * 查询服务分类列表
     * @param categoryType
     * @return
     */
    @GetMapping(value = "/getCategoryList/{categoryType}")
    R<List<ServiceCategoryVO>> getCategoryList(@PathVariable("categoryType") Integer categoryType);

    /**
     * 保存服务分类
     * @param serviceCategoryDTO
     * @return
     */
    @PostMapping(value = "/saveServiceCategoryInfo")
    R<Boolean> saveServiceCategoryInfo(@RequestBody ServiceCategoryDTO serviceCategoryDTO);


    /**
     * 修改服务分类
     * @param serviceCategoryDTO
     * @return
     */
    @PostMapping(value = "/updateServiceCategoryById")
   R<Boolean> updateServiceCategoryById(@RequestBody ServiceCategoryDTO serviceCategoryDTO);


    /**
     * 删除服务分类
     * @param id
     * @return
     */
    @GetMapping(value = "/delServiceCategoryById/{id}")
    R<Boolean> delServiceCategoryById(@PathVariable("id") Long id);


    /**
     * 查询服务分类列表
     * @param categoryType
     * @return
     */
    @GetMapping(value = "/getCategoryList/{categoryType}/{exhibitionManageId}")
    R<List<ServiceCategoryVO>> getCategoryListByExhibitionManageId(@PathVariable("categoryType") Integer categoryType,@PathVariable("exhibitionManageId") Long exhibitionManageId);


    /**
     * 查询服务分类列表
     * @param ids ids
     * @return R<List<ServiceCategoryVO>>
     */
    @PostMapping("/getCategoryListByIds")
    R<List<ServiceCategoryVO>> getCategoryListByIds(@RequestBody List<Long> ids);

}
